{include_core file="lib/header.html" title="个人中心"}
<div class="content">
  <br><br>
  <div class="container clearfix">
    <!--start:sidecon-->
    {include file="{$smarty.const.MODULE_PATH}/home/template/lib/home_sider.html"}
    <!--end:sidecon-->
    <!--start:main-->
    <div class="main right">
      <!--start:个人中心首页-->
      <div class="center-index">
        <div class="center-info">
          <dl class="item clearfix">
            <dt>用户昵称</dt>
            <dd>{user_helper::get_nick_name()}</dd>
          </dl>
          <dl class="item item2 clearfix">
            <dt>用户头像</dt>
            <dd><div class="avatar"><a href="{AnUrl('user/setting/avatar')}"><img src="{user_helper::avatar(user_helper::get_user_id())}"></a></div></dd>
          </dl>
          <dl class="item clearfix">
            <dt>登录手机号码</dt>
            <dd>{substr($user_info.mobile, 0, 3)}*****{substr($user_info.mobile, -3)}</dd>
          </dl>
          <dl class="item clearfix">
            <dt>账号绑定</dt>
            <dd>
              {$bind_list = openapi_helper::get_user_bind_list()}
              {foreach $bind_list as $k=>$v}
              <a href="{AnUrl('user/setting/account_bind')}" class="had">
                {if $v.connect_site_id == 1}
                <!-- <em class="icon-weibo2"></em> -->
                <img src="{$smarty.const.SITE_URL}/images/icon-sina.png" width="22">
                {/if}
                {if $v.user_name}{$v.user_name}{else}{$v.nick_name}{/if}
              </a>&nbsp;&nbsp;
              {/foreach}
              {$bind_qq_list = openapi_helper::get_user_bind_list(5)}
              {foreach $bind_qq_list as $k=>$v}
              <a href="{AnUrl('user/setting/account_bind')}" class="had">
                <img src="{$smarty.const.SITE_URL}/images/Connect_logo_1.png">
                {$v.connect_nick_name}
              </a>
              {/foreach}
              {if empty($bind_list) && empty($bind_qq_list)}
              <a href="{AnUrl('user/setting/account_bind')}" class="none">无绑定</a>
              {/if}
            </dd>
          </dl>
        </div>
        {if !empty($buy_list)}
        <div class="center-buys">
          <div class="title1">最近购买</div>
          <ul class="center-buys-list clearfix">
            {foreach $buy_list as $k=>$v}
            <li>
              <div class="pic"><a href='{AnUrl("goods/`$v.id`")}'><img src="{_image($v.cover, 'middle')}"></a></div>
              <h4 class="title2"><a href='{AnUrl("goods/`$v.id`")}'>{cut_str($v.title, 8, '...')}</a></h4>
              <p>￥：{$v.price|number_format:2}</p>
            </li>
            {/foreach}
          </ul>
        </div>
        {/if}
      </div>
      <!--end:个人中心首页-->
    </div>
    <!--end:main-->
  </div>
</div>
{include_core file="lib/footer.html"}